extends ../layout

block content
  .container
    .row
      .panel.panel-default
        .panel-heading
          h3 #{keyword}            
        .panel-body
          if movies && movies.length > 0       
            each item in movies
              .col-md-2
                .thumbnail
                  a(href="/movie/" + item._id)
                    img(src=item.poster, alt=item.title)
                  .caption
                    h3: item.title
                    a(href="/movie/" + item._id,role="butter") #{item.title}
      ul.pagination
        - for (var i = 0; i < totalPage; i++){
          - if (currentPage == (i+1)){
              li.active
                span #{currentPage}
          - }
          - else{
              li
                a(href='/results?' +query+ '&p=' +i) #{i+1}
          - }
        - }